// lib/constants/theme.dart

import 'package:flutter/material.dart';
import 'colors.dart';
import 'text_styles.dart';

class AppTheme {
  static ThemeData lightTheme = ThemeData(
    brightness: Brightness.light,
    primaryColor: AppColors.primary,
    primaryColorDark: AppColors.primaryVariant,
    scaffoldBackgroundColor: AppColors.background,

    // 文本主题
    textTheme: TextTheme(
      headlineLarge: AppTextStyles.headline1,
      headlineMedium: AppTextStyles.headline2,
      headlineSmall: AppTextStyles.headline3,
      displayLarge: AppTextStyles.headline1,
      displayMedium: AppTextStyles.headline2,
      displaySmall: AppTextStyles.headline3,
      titleLarge: AppTextStyles.headline1,
      titleMedium: AppTextStyles.headline2,
      titleSmall: AppTextStyles.headline3,
      bodyLarge: AppTextStyles.headline1,
      bodyMedium: AppTextStyles.headline2,
      bodySmall: AppTextStyles.headline3,
      labelLarge: AppTextStyles.headline1,
      labelMedium: AppTextStyles.headline2,
      labelSmall: AppTextStyles.headline3,

    ),

    // 按钮主题
    buttonTheme: ButtonThemeData(
      buttonColor: AppColors.primary,
      textTheme: ButtonTextTheme.primary,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(8.0),
      ),
    ),

    // 输入框主题
    inputDecorationTheme: InputDecorationTheme(
      border: OutlineInputBorder(
        borderRadius: BorderRadius.circular(8.0),
        borderSide: BorderSide(color: AppColors.grey400),
      ),
      enabledBorder: OutlineInputBorder(
        borderRadius: BorderRadius.circular(8.0),
        borderSide: BorderSide(color: AppColors.grey400),
      ),
      focusedBorder: OutlineInputBorder(
        borderRadius: BorderRadius.circular(8.0),
        borderSide: BorderSide(color: AppColors.primary),
      ),
      errorBorder: OutlineInputBorder(
        borderRadius: BorderRadius.circular(8.0),
        borderSide: BorderSide(color: AppColors.error),
      ),
      labelStyle: AppTextStyles.bodyText1.copyWith(color: AppColors.grey600),
      hintStyle: AppTextStyles.bodyText1.copyWith(color: AppColors.grey400),
    ),

  );

  static ThemeData darkTheme = ThemeData(
    brightness: Brightness.dark,
    // 类似lightTheme的配置...
  );
}